<#include "../common/_header.htm">
<div id="bodyhidebox" style="height:100%;width:100%">
    <div class="fileContent" id="fileContent">
        <div class="fileDetail">
            <div class="filePhoto"><img class="photoPer" src="" onerror="javascript:this.src='../../../imgs/renyuan.png';" alt=""></div>
            <ul class="fileInfomu">
                <li id="personName">对象名称：</li>
                <li id="idType">证件类型：</li>
                <li id="idNumber">证件号码：</li>
            </ul>
            <ul class="fileInfomu">
                <li id="phoneNumber">联系电话：</li>
                <li id="birthPlace">出生地：</li>
                <li id="bodyType">人员类型：</li>
            </ul>
             <ul class="fileInfomu">
                <li id="remark">描述：</li>
                <li id="dataSource">数据来源：</li>
            </ul>
        </div>
        <input type="button" class="filEditBtn btn btn-primary" value="对象编辑" onClick="showEditDialog()">
        <input type="button" class="deleteEditBtn btn btn-danger" value="对象删除" onClick="deleteAccountBody()">
        <input type="button" class="filTagEditBtn btn btn-primary" value="标签编辑"  onClick="taghidebox()">
        <div class="fileTag" id="fileTagId">
            <div class="filecont">
                <div class="fileTagTitle">标签</div>
            </div>
            <ul class="fileTagmu" >
            </ul>
        </div>
        <div class="fileAccount" id="fileAccountId">
            <div class="filecont">
                <div class="fileAccountTitle">银行卡号</div>
                <div class="moreDetailBtn" onClick="moreDetailDialog()"> 查看更多
                    <span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span>
                </div>
            </div>
            <div class="fileAccountTable">
            	<table id="cardTable" class="table table-bordered table-striped table-hide" style="width:92%">
            	  <tr>
                        <th>卡号</th>
                        <th>归属行</th>
                        <th>总交易次数</th>
                        <th>余额</th>
                    </tr>
            	</table>
            </div>
        </div>
        <div class="filePhone" id="filePhoneId">
            <div class="filecont">
                <div class="filePhoneTitle">手机号</div>
                <div class="moreDetailBtn" onClick="morePhoneDetailDialog()">查看更多
                    <span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span>
                </div>
            </div>
            <div class="fileAccountTable">
                <table id="phoneTable" class="table table-bordered table-striped table-hide" style="width:92%">
                    <tr>
                        <th>手机号</th>
                        <th>归属地</th>
                        <th>通话次数</th>
                    </tr>
                </table>
            </div>
        </div>
        <div class="filePhone" id="filePhoneId1">
            <div class="filecont">
                <div class="filePhoneTitle">qq</div>
                <div class="moreDetailBtn" onClick="moreQQDetailDialog()">查看更多
                    <span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span>
                </div>
            </div>
            <div class="fileAccountTable">
                <table id="qqTable" class="table table-bordered table-striped table-hide" style="width:92%">
                    <tr>
                        <th>本人昵称</th>
                        <th>本人qq号码</th>
                        <th>对方昵称</th>
                        <th>对方qq号码</th>
                        <th>交易总金额</th>
                        <th>交易次数</th>
                    </tr>
                </table>
            </div>
        </div>
        <div class="filePhone" id="filePhoneId2">
            <div class="filecont">
                <div class="filePhoneTitle">微信</div>
                <div class="moreDetailBtn" onClick="moreWeChatDetailDialog()">查看更多
                    <span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span>
                </div>
            </div>
            <div class="fileAccountTable">
                <table id="weChatTable" class="table table-bordered table-striped table-hide" style="width:92%">
                    <tr>
                        <th>本人昵称</th>
                        <th>本人微信号码</th>
                        <th>对方昵称</th>
                        <th>对方微信号码</th>
                        <th>交易总金额</th>
                        <th>交易次数</th>
                    </tr>
                </table>
            </div>
        </div>
        <div class="filePhone" id="filePhoneId3">
            <div class="filecont">
                <div class="filePhoneTitle">支付宝</div>
                <div class="moreDetailBtn" onClick="moreAliPayDetailDialog()">查看更多
                    <span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span>
                </div>
            </div>
            <div class="fileAccountTable">
                <table id="aliPayTable" class="table table-bordered table-striped table-hide" style="width:92%">
                    <tr>
                        <th>本人昵称</th>
                        <th>本人号码</th>
                        <th>对方昵称</th>
                        <th>对方号码</th>
                        <th>交易总金额</th>
                        <th>交易次数</th>
                    </tr>
                </table>
            </div>
        </div>
        <div class="personalInfo">
            <ul class="personalInfomu">
                <li id="li1"><a href="#fileTagId">标签</a></li>
                <li id="li2"><a href="#fileAccountId">银行卡号</a></li>
                <li id="li3"><a href="#filePhoneId">手机号</a></li>
                <li id="li4"><a href="#filePhoneId1">qq</a></li>
                <li id="li5"><a href="#filePhoneId2">微信</a></li>
                <li id="li6"><a href="#filePhoneId3">支付宝</a></li>
            </ul>
        </div>
    </div>
</div>
<script>
   	/** 回去传值 **/
   	var dialog = top.dialog.get(window);
    var accountBody = dialog.data.accountBody.replace(/<[^>]+>/g,""); // 获取对话框传递过来的数据
    var level = dialog.data.level; // 获取对话框传递过来的数据
    var cardNumbers = dialog.data.cardNumbers; // 卡号合并后
    var caseId = dialog.data.caseId; 
    var paramsIdNumber = null; // 卡号合并后
    var showEditParams = {};
    var showPersonTagParams = {};
    var personId='';
    
    if(accountBody.indexOf("未知")>=0){
    	//找不到案件对象，要初始化先添加案件对象
    	showEditDialog();
    }
    
    /** 编辑页面跳转 **/
    function showEditDialog() {
    	showEditParams.cardNumbers = cardNumbers;
    	showEditParams.casemanagerId = caseId;
        var d = top.dialog({
            title : "编辑详情        (修改正确姓名和身份证可将卡号归属到对应主题下)",
            modal : true,
            url : '${ctx}/bill/stream/d3/leftTreeEditDialogInit',
            height : 490,
            width : 500,
            data : showEditParams
        });
        d.show();
        return false;
    }
    /*删除交易主体*/
    function deleteAccountBody(){
    	var showDeleteParams = {"accountBody" : accountBody , "cardNumbers" : cardNumbers,"caseId" : caseId};
    	var d = top.dialog({
            title : '删除交易主体',
            modal : true,
            url : '${ctx}/bill/stream/d3/leftTreeDeleteDialogInit',
            height : 250,
            width : 500,
            data : showDeleteParams,
            onshow : function () {
            }
        });
        d.show();
        return false;
    }
    
    $(function(){
        var data = {"accountBody" : accountBody,"showNumber" : "6" , "level" : level, "caseId" : caseId,"cardNumbers" : cardNumbers};
        $.ajax({
		    url : '${ctx}/bill/stream/d3/getPersonInformation',
		    type : 'post',
		    async : false,
		    contentType : "application/json;charset=UTF-8",
		    data : JSON.stringify(data),
		    dataType : 'json',
		    success : function (obj) {
		    	debugger
		    	if(obj.code == 20000){
		    		//设置标签传递参数
		    		if(obj.data.pi){
			    		personId = obj.data.pi.pid;
			    		$.ajax({
			              	type : "post",
						    async : false,
							url : "${ctx}/bill/stream/d3/getPersonTag",
							contentType : "application/json;charset=UTF-8",
							data : JSON.stringify({"personId" : personId}),
							success : function (data) {
								var _inHtml = '';
								$.each(data.ps ,function (i,n) {
								_inHtml+= '<li>'+n+'<span class="tagCircle"></span></li>';
							});
							$('.fileTagmu').append(_inHtml);
							}
			            });
			    		var personName = obj.data.pi.personName == null ? '' : obj.data.pi.personName;//姓名
			    		var idType = obj.data.pi.idType == null ? '' : obj.data.pi.idType;//证件类型
			    		var idNumber = obj.data.pi.idNumber == null ? '' : obj.data.pi.idNumber;//身份证号
			    		paramsIdNumber = idNumber;
			    		var phoneNumber = obj.data.pi.phoneNumber == null ? '' : obj.data.pi.phoneNumber;//联系电话
			    		var birthPlace = obj.data.pi.birthPlace == null ? '' : obj.data.pi.birthPlace;//出生地
			    		var dataSource = obj.data.pi.dataSource == null ? '' : obj.data.pi.dataSource;//数据来源
			    		var bodyType = obj.data.pi.bodyType == null ? '' : obj.data.pi.bodyType;//人员类型
			    		var remark = obj.data.pi.remark == null ? '' : obj.data.pi.remark;//描述
			    		$("#personName").append(personName);
			    		$("#idType").append(idType);
			    		$("#idNumber").append(idNumber);
			    		$("#phoneNumber").append(phoneNumber);
			    		$("#remark").append(remark);
			    		$("#birthPlace").append(birthPlace);
			    		$("#dataSource").append(dataSource);
			    		$("#bodyType").append(bodyType);
			    		showEditParams.personName = personName;
			    		showEditParams.idType = obj.data.pi.idType;
			    		showEditParams.pid = obj.data.pi.pid;
			    		showEditParams.idNumber = idNumber;
			    		showEditParams.phoneNumber = phoneNumber;
			    		showEditParams.remark = remark;
			    		showEditParams.birthPlace = birthPlace;
			    		showEditParams.cardNumbers = cardNumbers;
			    		showEditParams.bodyType = bodyType;
		    		}
		    		//卡号信息
		    		var cardTable = $("#cardTable");
		    		var _cardsHtml = '';
		    		if(obj.data.pcs != null && obj.data.pcs.length > 0){
		    			$.each(obj.data.pcs,function(index,value) {
			    			var accountBodyCard = value.accountBodyCard == null ? '' : value.accountBodyCard;
			    			var accountBodyBank = value.accountBodyBank == null ? '' : value.accountBodyBank;
			    			var tranNumber = value.tranNumber == null ? '' : value.tranNumber;
			    			var balance = value.balance == null ? '' :value.balance;
			    			_cardsHtml +="<tr>";
			    			_cardsHtml +="<td>"+ accountBodyCard +"</td>";
				    		_cardsHtml +="<td>"+ accountBodyBank +"</td>";
					        _cardsHtml +="<td>"+ tranNumber +"</td>";
						    _cardsHtml +="<td>"+ balance +"</td>";
						    _cardsHtml +="</tr>";
			    		});
		    		}else{
		    			_cardsHtml +="<tr><td colspan='4' style='text-align:center'>未查询出结果</td><tr>";
		    		}
		    		cardTable.append(_cardsHtml);
		    		//手机号信息
		    		var phoneTable = $("#phoneTable");
		    		var _phonesHtml = '';
		    		if(obj.data.phones != null && obj.data.phones.length > 0){
		    			$.each(obj.data.phones,function(index,value) {
			    			var SERVICENUMBER = value.SERVICENUMBER == null ? '' : value.SERVICENUMBER;
			    			var SERVICELOCATION = value.SERVICELOCATION == null ? '' : value.SERVICELOCATION;
			    			var CALLNUMBER = value.CALLNUMBER == null ? '' : value.CALLNUMBER;
			    			_phonesHtml +="<tr>";
			    			_phonesHtml +="<td>"+ SERVICENUMBER +"</td>";
			    			_phonesHtml +="<td>"+ SERVICELOCATION +"</td>";
			    			_phonesHtml +="<td>"+ CALLNUMBER +"</td>";
			    			_phonesHtml +="</tr>";
			    		});
		    		}else{
		    			_phonesHtml +="<tr><td colspan='3' style='text-align:center'>未查询出结果</td><tr>";
		    		}
		    		phoneTable.append(_phonesHtml);
		    		
		    		//qq
		    		var qqTable = $("#qqTable");
		    		var _qqHtml = '';
		    		if(obj.data.qqMap != null && obj.data.qqMap.length > 0){
		    			$.each(obj.data.qqMap,function(index,value) {
			    			var ACCOUNTBODY = value.ACCOUNTBODY == null ? '' : value.ACCOUNTBODY;
			    			var ACCOUNTBODYCARD = value.ACCOUNTBODYCARD == null ? '' : value.ACCOUNTBODYCARD;
			    			var ACCOUNTRIVAL = value.ACCOUNTRIVAL == null ? '' : value.ACCOUNTRIVAL;
			    			var ACCOUNTRIVALCARD = value.ACCOUNTRIVALCARD == null ? '' : value.ACCOUNTRIVALCARD;
			    			var TOTALMONEY = value.TOTALMONEY == null ? '' : value.TOTALMONEY;
			    			var ACCOUNTNUMBER = value.ACCOUNTNUMBER == null ? '' : value.ACCOUNTNUMBER;
			    			_qqHtml +="<tr>";
			    			_qqHtml +="<td>"+ ACCOUNTBODY +"</td>";
			    			_qqHtml +="<td>"+ ACCOUNTBODYCARD +"</td>";
			    			_qqHtml +="<td>"+ ACCOUNTRIVAL +"</td>";
			    			_qqHtml +="<td>"+ ACCOUNTRIVALCARD +"</td>";
			    			_qqHtml +="<td>"+ TOTALMONEY +"</td>";
			    			_qqHtml +="<td>"+ ACCOUNTNUMBER +"</td>";
			    			_qqHtml +="</tr>";
			    		});
		    		}else{
		    			_qqHtml +="<tr><td colspan='6' style='text-align:center'>未查询出结果</td><tr>";
		    		}
		    		qqTable.append(_qqHtml);
		    		
		    		//微信
		    		var weChatTable = $("#weChatTable");
		    		var _weChatHtml = '';
		    		if(obj.data.weChatMap != null && obj.data.weChatMap.length > 0){
		    			$.each(obj.data.weChatMap,function(index,value) {
			    			var ACCOUNTBODY = value.ACCOUNTBODY == null ? '' : value.ACCOUNTBODY;
			    			var ACCOUNTBODYCARD = value.ACCOUNTBODYCARD == null ? '' : value.ACCOUNTBODYCARD;
			    			var ACCOUNTRIVAL = value.ACCOUNTRIVAL == null ? '' : value.ACCOUNTRIVAL;
			    			var ACCOUNTRIVALCARD = value.ACCOUNTRIVALCARD == null ? '' : value.ACCOUNTRIVALCARD;
			    			var TOTALMONEY = value.TOTALMONEY == null ? '' : value.TOTALMONEY;
			    			var ACCOUNTNUMBER = value.ACCOUNTNUMBER == null ? '' : value.ACCOUNTNUMBER;
			    			_weChatHtml +="<tr>";
			    			_weChatHtml +="<td>"+ ACCOUNTBODY +"</td>";
			    			_weChatHtml +="<td>"+ ACCOUNTBODYCARD +"</td>";
			    			_weChatHtml +="<td>"+ ACCOUNTRIVAL +"</td>";
			    			_weChatHtml +="<td>"+ ACCOUNTRIVALCARD +"</td>";
			    			_weChatHtml +="<td>"+ TOTALMONEY +"</td>";
			    			_weChatHtml +="<td>"+ ACCOUNTNUMBER +"</td>";
			    			_weChatHtml +="</tr>";
			    		});
		    		}else{
		    			_weChatHtml +="<tr><td colspan='6' style='text-align:center'>未查询出结果</td><tr>";
		    		}
		    		weChatTable.append(_weChatHtml);
		    		//支付宝
		    		var aliPayTable = $("#aliPayTable");
		    		var _aliPayHtml = '';
		    		if(obj.data.alipayMap != null && obj.data.alipayMap.length > 0){
		    			$.each(obj.data.alipayMap,function(index,value) {
			    			var ACCOUNTBODY = value.ACCOUNTBODY == null ? '' : value.ACCOUNTBODY;
			    			var ACCOUNTBODYCARD = value.ACCOUNTBODYCARD == null ? '' : value.ACCOUNTBODYCARD;
			    			var ACCOUNTRIVAL = value.ACCOUNTRIVAL == null ? '' : value.ACCOUNTRIVAL;
			    			var ACCOUNTRIVALCARD = value.ACCOUNTRIVALCARD == null ? '' : value.ACCOUNTRIVALCARD;
			    			var TOTALMONEY = value.TOTALMONEY == null ? '' : value.TOTALMONEY;
			    			var ACCOUNTNUMBER = value.ACCOUNTNUMBER == null ? '' : value.ACCOUNTNUMBER;
			    			_aliPayHtml +="<tr>";
			    			_aliPayHtml +="<td>"+ ACCOUNTBODY +"</td>";
			    			_aliPayHtml +="<td>"+ ACCOUNTBODYCARD +"</td>";
			    			_aliPayHtml +="<td>"+ ACCOUNTRIVAL +"</td>";
			    			_aliPayHtml +="<td>"+ ACCOUNTRIVALCARD +"</td>";
			    			_aliPayHtml +="<td>"+ TOTALMONEY +"</td>";
			    			_aliPayHtml +="<td>"+ ACCOUNTNUMBER +"</td>";
			    			_aliPayHtml +="</tr>";
			    		});
		    		}else{
		    			_aliPayHtml +="<tr><td colspan='6' style='text-align:center'>未查询出结果</td><tr>";
		    		}
		    		aliPayTable.append(_aliPayHtml);
		    	}
		    }
		});
        
        var url = window.location.href;
        let s=url.split("#")[1]?"a":url.split("#")[1];
        if (s=="a"){
            $("#li1").css("background","#4695ED")
        }
        let aheight=$("#fileAccountId").outerHeight(true)
        let bheight=$("#filePhoneId").outerHeight(true)+aheight
        let cheight=$("#filePhoneId1").outerHeight(true)+bheight
        let dheight=$("#filePhoneId2").outerHeight(true)+cheight
        let eheight=$("#filePhoneId3").outerHeight(true)+dheight
        let fheight=$("#filePhoneId4").outerHeight(true)+eheight
        let gheight=$("#filePhoneId5").outerHeight(true)+fheight
        let hheight=$("#filePhoneId6").outerHeight(true)+gheight
        let iheight=$("#filePhoneId7").outerHeight(true)+hheight
        let i=0
        $("#bodyhidebox").scroll(function() {
            let top=$("#bodyhidebox").scrollTop()
            if (top<aheight) {
                $(".personalInfomu li").css("background","#fff")
                $("#li1").css("background","#4695ED")
            }else if (top<bheight){
                $(".personalInfomu li").css("background","#fff")
                $("#li2").css("background","#4695ED")
            } else if (top<cheight){
                $(".personalInfomu li").css("background","#fff")
                $("#li3").css("background","#4695ED")
            }else if (top<dheight){
                $(".personalInfomu li").css("background","#fff")
                $("#li4").css("background","#4695ED")
            }else if (top<eheight){
                $(".personalInfomu li").css("background","#fff")
                $("#li5").css("background","#4695ED")
            }else if (top<fheight){
                $(".personalInfomu li").css("background","#fff")
                $("#li6").css("background","#4695ED")
            }else if (top<gheight){
                $(".personalInfomu li").css("background","#fff")
                $("#li7").css("background","#4695ED")
            }else if (top<hheight){
                $(".personalInfomu li").css("background","#fff")
                $("#li8").css("background","#4695ED")
            }else if (top<iheight){
                $(".personalInfomu li").css("background","#fff")
                $("#li9").css("background","#4695ED")
            }else if (top<gheight){
                $(".personalInfomu li").css("background","#fff")
                $("#li10").css("background","#4695ED")
            }
        });
        $('.personalInfomu li').click(function(){
            $('.personalInfomu li').removeClass("fileActive");
            $(this).addClass("fileActive");
        });
	});
    //银行卡号查看更多
    function moreDetailDialog(){
        var param = {};
        param.accountBody = accountBody;
        param.level = level;
        param.caseId = caseId;
        param.cardNumbers = cardNumbers;
        var d = top.dialog({
            title : '银行卡号详情',
            modal : true,
            url : '${ctx}/bill/stream/d3/moreDetailDialogInit',
            height : 800,
            width : 1500,
            data : param,
            onshow : function () {
            }
        });
        d.show();
        return false;
    }
  	//手机号码查看更多
    function morePhoneDetailDialog(){
        var param = {};
        param.paramsIdNumber = paramsIdNumber;
        var d = top.dialog({
            title : '手机号码详情',
            modal : true,
            url : '${ctx}/bill/stream/d3/morePhoneDetailDialogInit',
            height : 800,
            width : 1500,
            data : param,
            onshow : function () {
            }
        });
        d.show();
        return false;
    }
  	
  	//qq查看更多
    function moreQQDetailDialog(){
        var param = {};
        param.paramsIdNumber = paramsIdNumber;
        var d = top.dialog({
            title : 'QQ详情',
            modal : true,
            url : '${ctx}/bill/stream/d3/moreQQDetailDialogInit',
            height : 800,
            width : 1500,
            data : param,
            onshow : function () {
            }
        });
        d.show();
        return false;
    }
  	//微信查看更多
    function moreWeChatDetailDialog(){
        var param = {};
        param.paramsIdNumber = paramsIdNumber;
        var d = top.dialog({
            title : '微信详情',
            modal : true,
            url : '${ctx}/bill/stream/d3/moreWeChatDetailDialogInit',
            height : 800,
            width : 1500,
            data : param,
            onshow : function () {
            }
        });
        d.show();
        return false;
    }
  	//支付宝查看更多
    function moreAliPayDetailDialog(){
        var param = {};
        param.paramsIdNumber = paramsIdNumber;
        var d = top.dialog({
            title : '支付宝详情',
            modal : true,
            url : '${ctx}/bill/stream/d3/moreAliPayDetailDialogInit',
            height : 800,
            width : 1500,
            data : param,
            onshow : function () {
            }
        });
        d.show();
        return false;
    };
    //编辑标签
    function taghidebox(){
    	var param = {};
        param.accountBody = accountBody;
        param.personId = personId;
        var d = top.dialog({
            title : '编辑标签',
            modal : true,
            url : '${ctx}/bill/stream/d3/showPersonTagPage',
            height : 400,
            width : 1000,
            data : param,
            onclose : function() {
                window.location.reload();
            }
        });
        d.show();
        return false;
    };
    
    /**身份证验证**/
	function idNumberValidate(value) {
        var vcity = {
            11: "北京", 12: "天津", 13: "河北", 14: "山西", 15: "内蒙古",
            21: "辽宁", 22: "吉林", 23: "黑龙江", 31: "上海", 32: "江苏",
            33: "浙江", 34: "安徽", 35: "福建", 36: "江西", 37: "山东", 41: "河南",
            42: "湖北", 43: "湖南", 44: "广东", 45: "广西", 46: "海南", 50: "重庆",
            51: "四川", 52: "贵州", 53: "云南", 54: "西藏", 61: "陕西", 62: "甘肃",
            63: "青海", 64: "宁夏", 65: "新疆", 71: "台湾", 81: "香港", 82: "澳门", 91: "国外"
        };

        // 判断是否为空
        isEmpty = function (card) {
            if (/^\s*$/.test(card) === true) {
                return true;
            }
        }
        //检查号码是否符合规范，包括长度，类型  
        isCardNo = function (card) {
            if (isEmpty(card)) {
                return true;
            }
            //这个代码表示身份证可以为空
            //身份证号码为15位或者18位，15位时全为数字，18位前17位为数字，最后一位是校验位，可能为数字或字符X  
            var reg = /(^\d{15}$)|(^\d{17}(\d|X)$)/;
            if (reg.test(card) === false) {
                return false;
            }


            return true;
        };

        //取身份证前两位,校验省份  
        checkProvince = function (card) {
            if (isEmpty(card)) {
                return true;
            }
            var province = card.substr(0, 2);
            if (vcity[province] == undefined) {
                return false;
            }
            return true;
        };

        //检查生日是否正确  
        checkBirthday = function (card) {
            if (isEmpty(card)) {
                return true;
            }
            var len = card.length;
            //身份证15位时，次序为省（3位）市（3位）年（2位）月（2位）日（2位）校验位（3位），皆为数字  
            if (len == '15') {
                var re_fifteen = /^(\d{6})(\d{2})(\d{2})(\d{2})(\d{3})$/;
                var arr_data = card.match(re_fifteen);
                var year = arr_data[2];
                var month = arr_data[3];
                var day = arr_data[4];
                var birthday = new Date('19' + year + '/' + month + '/' + day);
                return verifyBirthday('19' + year, month, day, birthday);
            }
            //身份证18位时，次序为省（3位）市（3位）年（4位）月（2位）日（2位）校验位（4位），校验位末尾可能为X  
            if (len == '18') {
                var re_eighteen = /^(\d{6})(\d{4})(\d{2})(\d{2})(\d{3})([0-9]|X)$/;
                var arr_data = card.match(re_eighteen);
                var year = arr_data[2];
                var month = arr_data[3];
                var day = arr_data[4];
                var birthday = new Date(year + '/' + month + '/' + day);
                return verifyBirthday(year, month, day, birthday);
            }
            return false;
        };

        //校验日期  
        verifyBirthday = function (year, month, day, birthday) {
            var now = new Date();
            var now_year = now.getFullYear();
            //年月日是否合理  
            if (birthday.getFullYear() == year && (birthday.getMonth() + 1) == month && birthday.getDate() == day) {
                //判断年份的范围（3岁到100岁之间)  
                var time = now_year - year;
                if (time >= 3 && time <= 100) {
                    return true;
                }
                return false;
            }
            return false;
        };

        //校验位的检测  
        checkParity = function (card) {
            if (isEmpty(card)) {
                return true;
            }
            //15位转18位  
            card = changeFivteenToEighteen(card);
            var len = card.length;
            if (len == '18') {
                var arrInt = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2);
                var arrCh = new Array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2');
                var cardTemp = 0, i, valnum;
                for (i = 0; i < 17; i++) {
                    cardTemp += card.substr(i, 1) * arrInt[i];
                }
                valnum = arrCh[cardTemp % 11];
                if (valnum == card.substr(17, 1)) {
                    return true;
                }
                return false;
            }
            return false;
        };

        //15位转18位身份证号  
        changeFivteenToEighteen = function (card) {
            if (isEmpty(card)) {
                return true;
            }
            if (card.length == '15') {
                var arrInt = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2);
                var arrCh = new Array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2');
                var cardTemp = 0, i;
                card = card.substr(0, 6) + '19' + card.substr(6, card.length - 6);
                for (i = 0; i < 17; i++) {
                    cardTemp += card.substr(i, 1) * arrInt[i];
                }
                card += arrCh[cardTemp % 11];
                return card;
            }
            return card;
        };

        //checkCard = function () {
        var card = value;
        //校验长度，类型  
        if (isCardNo(card) === false) {
            //alert('您输入的身份证号码不正确，请重新输入');
            //document.getElementById('card_no').focus;
            return false;
        }
        //检查省份  
        if (checkProvince(card) === false) {
            return false;
        }
        //校验生日  
        if (checkBirthday(card) === false) {
            return false;
        }
        //检验位的检测  
        if (checkParity(card) === false) {
            return false;
        }
        return true;
    }
</script>
<style>
	.filEditBtn {
	        width: 90px;
		    height: 32px;
		    line-height: 10px;
		    background-color: #4695ed;
		    border-color: #4695ed;
		    margin-top: -80px;
		    margin-left: 168px;
	}
	.filTagEditBtn {
	        width: 90px;
		    height: 32px;
		    line-height: 10px;
		    background-color: #4695ed;
		    border-color: #4695ed;
		    margin-top: -80px;
		    margin-left: 20px;
	}
	.deleteEditBtn {
	        width: 90px;
		    height: 32px;
		    line-height: 10px;
		    margin-top: -80px;
		    margin-left: 20px;
	}
	.btn-primary:focus {
	    background-color: #4695ed;
	    border-color: #4695ed;
	}
	.btn-primary:active {
	    background-color: #4695ed;
	    border-color: #4695ed;
	}
	.btn-primary:hover {
	    background-color: #4695ed;
	    border-color: #4695ed;
	}
    .moreDetailBtn:hover {
        background-color: #ccd0d7;
        border-radius: 5px 5px 5px 5px;
    }
    .personalInfomu {
        position: relative;
        background-color: #f6f9fa;
        border: 1px solid #e5e9ef;
        overflow: hidden;
        border-radius: 4px;
        padding-left: 0;
    }
    .fileTagmu li:nth-child(6n+1){
        background-color: #E84C3D;
    }
    .fileTagmu li:nth-child(6n+2){
        background-color: #E67E23;
    }
    .fileTagmu li:nth-child(6n+3){
        background-color: #F29C11;
    }
    .fileTagmu li:nth-child(6n+4){
        background-color: #9A59B7;
    }
    .fileTagmu li:nth-child(6n+5){
        background-color: #3196DB;
    }
    .fileTagmu li:nth-child(6n){
        background-color: #2FCB72;
    }
    .fileActive{
        background-color: #4695ED;
        color: white;
    }
    #bodyhidebox {
        top: 23px;
        left: 2%;
        border-radius: 5px;
        background-color:#fff;
        z-Index:9999;
        padding: 10px;
        overflow-y: scroll;
    }
    .fileDetail{
        width: 100%;
        height: 160px;
        padding: 0 20px 0 30px;
    }
    .filePhoto{
        float: left;
    }
    img.photoPer {
        width: 100px;
        height: 100px;
    }
    .fileInfomu,.fileInfomue{
        float: left;
    }
    ul.fileInfomu {
        margin-right: 150px;
    }
    .fileInfomu li,
    .fileInfomue li{
        margin-bottom: 12px;
        font-size: 15px;
    }
    .fileTag {
        overflow: hidden;
        margin-top: -10px;
    }
    .fileTagmu{
        padding-left: 0;
    }
    .fileTagTitle,
    .fileAccountTitle,
    .filePhoneTitle{
        font-size: 18px;
        color: #6BA8F0;
        margin-bottom: 10px;
        float: left;
    }
    .moreDetailBtn{
        width: 90px;
        height: 30px;
        float: right;
        margin-right: 119px;
        line-height: 30px;
        text-align: center;
        font-size: 12px;
        color: #555;
        border: 1px solid #CCD0D7;
        cursor: pointer;
        transition: all .2s;
        border-radius: 5px 5px 5px 5px;
    }
    span.glyphicon.glyphicon-menu-right {
        color: #555;
        font-size: 11px;
    }
    .fileTagmu li{
        position: relative;
        float: left;
        min-width: 90px;
        height: 24px;
        line-height: 24px;
        text-align: center;
        color: white;
        background-color: deeppink;
        border-radius: 15px 50px 50px 15px;
        padding: 0px 15px;
        margin-right: 12px;
    }
    /*.arrow {
        content: "";
        height: 0px;
        width: 0px;
        border-width: 12px;
        border-style: solid;
        border-color: transparent transparent transparent deeppink;
        position: absolute;
        right: -24px;
    }*/
    .tagCircle{
        width: 6px;
        height: 6px;
        background-color: #fff;
        border-radius: 5px;
        position: absolute;
        right: 8px;
        top: 9px;
        z-index: 1;
    }
    .fileAccount,
    .filePhone{
        margin-top: 20px;
    }
    .personalInfo{
        position: fixed;
        top: 165px;
        right: 40px;
    }
    .personalInfomu li {
        height: 30px;
        width: 90px;
        text-align: center;
        line-height: 30px;
    }
    .filecont{
        overflow: hidden;
    }
    .personalInfomu a{
        color: black;
    }
    .editSure {
        padding-top: 30px;
        text-align: center;
    }
    .form-control:focus {
        border-color: #4695ed;
        box-shadow: none;
    }
    span.iconfont.icon-jiufuqianbaoicon14 {
        font-size: 12px;
        margin-left: -17px;
        color: red;
    }
    .form-group{
        margin-left: 25px;
    }
    .nameInp{
        display: inline-block;
        width: 220px;
        margin-left: 20px;
        border-radius: 5px;
    }
    .newAdd-trouble{
        color: #6f7689;
        font-size: 14px;
        font-weight: 400;
        margin-bottom: 15px;
        float: left;
        margin-right: 25px;
    }
    
    .bulkInsert{
        margin-top: 20px;
        margin-left: 115px;
    }
    .bulkInsert .bulk-input{
        width: 50%;
        height: 35px;
        border-radius: 4px;
        border: 1px solid #ccc;
        padding: 6px;
        outline: none
    }
    input::-webkit-input-placeholder {
        color: #ccc;
    }
    .bulkInsert .newAdd-trouble{
        color: #6f7689;
        font-size: 14px;
        font-weight: 400;
    }
    .bulkInsert-iqre,.bulkInsert-epty,.bulkInsert-sure,.bulkInsert-back{
        width: 70px;
        margin-left: 15px;
        background-color: #4695ed;
        height: 32px;
        font-size: 14px;
        border: 1px solid transparent;
        color: white;
        border-radius: 4px;
    }
    .bulkInsert-epty {
        background-color: #e7e7e7;
        color: black;
        border-color: #adadad;
    }
    .newAdd-input{
        width: 800px;
        height: 35px;
        border-radius: 4px;
        border: 1px solid #e4e4e4;
        outline:none;
        padding: 0 8px 0 8px;
        display: block;
    }
    .el-tag + .el-tag {
        margin-left: 10px;
    }
    .button-new-tag {
        margin-left: 10px;
        height: 32px;
        line-height: 30px;
        padding-top: 0;
        padding-bottom: 0;
    }
    .input-new-tag {
        width: 90px;
        margin-left: 10px;
        vertical-align: bottom;
    }
    div#batchKey {
        height: 200px;
        border: 1px solid #ccc;
        border-radius: 4px;
        padding: 10px;
        margin-left: 116px;
    }
    .el-tag .el-icon-close{
        color: white;
    }
    .el-tag{
        background-color: #4695ed;
    }
    .newAdd-answer {
        margin-bottom: 35px;
    }
    input.bulkInsert-sure,input.bulkInsert-back {
        width: 100px;
    }
    .sureBack {
        text-align: center;
        margin-top: 25px;
    }
    div#edui1_iframeholder {
        height: 200px!important;
    }
    button.el-button.el-button--default {
	    width: 85px;
	    height: 30px;
	    line-height: 6px;
	    margin-right: -3px;
	}
</style>
</body>
</html>